import Taro, { useState, useEffect, useRouter } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { IIndex } from '../../interfaces/index'
import useBasePage from '../basePage/useBasePage'
import { observer } from '@tarojs/mobx'

const Login = () => {
  const { params } = useRouter()
  const { onload, awtRs } = useBasePage()
  const [ pageTitle, setPageTitle ] = useState<IIndex['pageTitle']>('登录账户')

  useEffect(() => {
    onload(async () => {
      // 这里写初始化逻辑
      console.log('参数：', params)
    }, pageTitle)
  }, [])

  return (
    <View className='page'>
      <Text>这里是{pageTitle}</Text>
    </View>
  )
}

export default observer(Login)
